﻿#region Usings

using System;
using System.Runtime.Serialization;

#endregion

namespace Rail.Net.Core.Model.Nonpersistent
{
    [Serializable]
    [DataContract]
    public class PriceProTraveler
    {
        public PriceProTraveler(SequenceModel sequence, TravelerModel traveler)
        {
            Sequence = sequence;
            Traveler = traveler;
            Price = 0m;
            Share = 1m;
        }

        [DataMember]
        public SequenceModel Sequence { get; private set; }

        [DataMember]
        public TravelerModel Traveler { get; private set; }

        [DataMember]
        public decimal Price { get; set; }

        [DataMember]
        public decimal Share { get; set; }

        public decimal TotalPrice
        {
            get { return Price*Share; }
        }
    }
}